﻿using com.guojin.core.io;
using com.guojin.core.io.message;

namespace com.guojin.mj.net.message.game
{
    public class UserChapterInfoRet : Message
    {
        public static int TYPE = 12;
        public static int ID = 5;

        public int LocationIndex { get; set; }
        public int[] Cards { get; set; }
        public string AllCardType { get; set; }
        public string ShowCardType { get; set; }
        public int UserTotalScore { get; set; }
        public int SettlementScore { get; set; }
        public int BetState { get; set; }//下注状态玩家状态 0无状态  1 下注中   2下注完成  3跟注中 4跟注完成 5弃牌（下注/跟注环节状态，其他默认无状态） */
        public int WinCounts { get; set; }
        public int DefeatCounts { get; set; }

        public void decode(Input _in)
        {
            LocationIndex = _in.readInt();
            Cards = _in.readIntArray();
            AllCardType = _in.readString();
            ShowCardType = _in.readString();
            UserTotalScore = _in.readInt();
            SettlementScore = _in.readInt();
            BetState = _in.readInt();
            WinCounts = _in.readInt();
            DefeatCounts = _in.readInt();
        }

        public void encode(Output _out)
        {
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return "UserChapterInfoRet[UserID=" + LocationIndex + "card=" + Cards + "allCradType =" + AllCardType +
                   "showCardType=" + ShowCardType + "settlementScore=" + SettlementScore + "userTotalScore=" + UserTotalScore +
                   "， userState="+BetState+"WinCounts="+WinCounts+", DefeatCounts="+DefeatCounts+"] ";
        }
    }
}